package com.guaju.yueshangLife.adapter;

import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.facebook.drawee.view.SimpleDraweeView;
import com.guaju.yueshangLife.R;
import com.guaju.yueshangLife.fragment.order.OrderListFragment;

import java.util.ArrayList;
import java.util.List;

import static com.guaju.yueshangLife.adapter.CardAdapter.MAX_ELEVATION_FACTOR;

public class OrderPagerAdapter extends FragmentPagerAdapter {

    private List<OrderListFragment> mFragments;

    public OrderPagerAdapter(FragmentManager fm,List<OrderListFragment> mFragments) {
        super(fm);
        this.mFragments=mFragments;
    }

    @Override
    public int getCount() {
        return mFragments.size()>0?mFragments.size():0;
    }
    @Override
    public Fragment getItem(int i) {
        return mFragments.get(i);
    }

}